Method and System For Creating and Restoring An Image File

ABSTRACT

An image file format and a method of creating and restoring an image file is provided by the present invention. The image file format includes a plurality of streams such as a control stream, a data stream, a bitmap stream, and a cluster map stream. An audit trail stream, properties stream and fix-up stream may also be provided. The present invention allows the contents of a storage media to be captured and stored as an image file. The image file is used to restore the storage media to a previous state or allows multiple computers to be provided with a common configuration. The plurality of streams further allow the image file to be viewed, edited or otherwise manipulated.

RELATED APPLICATIONS

This is a continuation of and claims priority to U.S. patent applicationSer. No. 10/185,755 filed on Jun. 28, 2002 entitled “Method and SystemFor Creating And Restoring An Image File” by inventors Wesley A. Wittand Edward S. Miller.

BACKGROUND

Computer systems interface to one or more storage media. The storagemedia stores a variety of data such as operating system files,application programs and data files used with application programs.Known storage media types include hard disks, CD ROMs, Digital VersatileDisk (DVD) and the like. The storage media is logically subdivided intoone or more volumes or partitions. The storage media is furtherphysically subdivided into a plurality of sectors. Each sector iscapable of storing a plurality of bytes of data. A cluster is group ofsectors and represents the smallest unit that an operating systemexecuting in the computer uses to identify locations on the storagemedia. Thus, the operating system typically stores or reads data on thestorage media on a cluster by cluster basis.

The data on the storage media is organized as a set of files and othercontrol information used to manage the files on the disk. For example,each operating system file, application program or data file representsa different file on the storage media. The control informationidentifies which clusters on the storage media include data for eachfile. The control information also identifies the clusters on thestorage media that are allocated, i.e. include data for a file, and theclusters that remain unallocated, i.e. are available to store new data.The precise manner that the files and control information are organizedon the storage media depends upon a file system. Various known filesystems exist, such as File Allocation Table 16 (FAT16), File AllocationTable 32 (FAT32) and New Technology File System (NTFS).

An image file is a copy of the data stored on a source storage mediavolume. Typically, the image file is a single stream of data that is asector by sector copy of the data contained on the source storage mediavolume. The image file is in turn stored on a destination storage mediavolume. The destination storage media volume is a different volume orpartition on the same storage media or, alternatively, a separatestorage media. For example, an image file that represents a sector bysector copy of a hard disk volume is stored on a CD ROM.

The image file is used for at least two functions. First, the image fileis used to restore the source storage media volume to its state at thetime the image file was created. Thus, the image file can be used torestore the storage media volume if it becomes damaged or corrupted.Second, the image file is used to provide a plurality of computersystems with the same basic configuration.

Because the image file is created as a sector by sector copy of thesource storage media, and is stored as a single data stream, it isdifficult to manipulate the image file. For example, if an image file iscreated for the source storage media volume and the operating systemfiles on that storage media volume are subsequently replaced with anewer version, the image file cannot readily be modified to include thenew operating system files. Instead a new image file must be created.Also, if a user or system administrator wants to maintain differentversions of an image file, separate image files must be created for eachdifferent version. Thus, known image file formats are resource intensiveand costly to maintain.

SUMMARY

In accordance with the foregoing, an image file and a method and systemfor creating and restoring the image file is provided. The image file iscreated from source data on a source storage media volume. The imagefile is stored on a destination storage media volume. The image fileincludes a plurality of image streams. The image streams include acontrol stream, a data stream, a bitmap bitmap stream, and a cluster mapstream. Other image streams such as an audit trail stream, a propertiesstream and a fix-up stream are optionally included in the image file.

The control stream forms a header for the image file that uniquelyidentifies the image file. The control stream also includes data thatidentifies the source storage media volume, such as data that identifiessource storage media volume geometry, and an operating system stored onthe source storage media. The control stream provides the informationneeded to read, restore and edit the image file.

The data stream includes data for each of a plurality of files on thesource storage media volume. The data stream also includes controlinformation from the source storage media volume. The data in the datastream is optionally compressed or encrypted. In an embodiment of theinvention, the data in the data stream is defragmented when the imagefile is created.

The bitmap stream identifies clusters on the source storage media thatare allocated to a file and the clusters that remain unallocated. Thebitmap stream facilitates editing of the image file by providing a fastlookup allowing the operating system to identify locations on the sourcestorage media available to store new data.

The cluster map stream correlates the location of a group of data on thesource storage media to its location in the data stream. Optional imagefile streams such as the property stream and audit trail stream identifythe types of files located in the image file and identify edits made tothe image file.

Additional features and advantages of the invention will be madeapparent from the following detailed description of illustrativeembodiments that proceeds with reference to the accompanying figures.

BRIEF DESCRIPTION OF THE CONTENTS

While the appended claims set forth the features of the presentinvention with particularity, the invention, together with its objectsand advantages, may be best understood from the following detaileddescription taken in conjunction with the accompanying drawings ofwhich:

FIG. 1 is a block diagram generally illustrating an exemplary computersystem on which the present invention resides.

FIG. 2 is a block diagram of an operating environment used to create,restore and edit the image file.

FIG. 3 is a block diagram illustrating the image file format.

FIG. 4 is a block diagram of the cluster map stream.

FIGS. 5 a and 5 b are block diagrams of source data and the data stream.

FIG. 6 is a flow chart illustrating an example of a procedure that maybe followed in an embodiment of the invention.

FIG. 7 is a flow chart illustrating an example of a procedure that maybe followed in an embodiment of the invention;

FIG. 8 is a flow chart illustrating an example of a procedure that maybe followed in an embodiment of the invention;

FIG. 9 is a flow chart illustrating an example of a procedure that maybe followed in an embodiment of the invention.

DETAILED DESCRIPTION

The invention is directed to an image file and a method and system forcreating and restoring the image file. The image file has a plurality ofstreams including a control stream, a data stream, a bitmap stream, acluster map stream, a fix-up stream, and optionally an audit trailstream and a property stream. The data stream includes source data froma source storage media volume. The control stream, bitmap stream,cluster map stream, audit trail stream and property stream includeinformation that allow access and editing to the source data in the datastream. The fix-up stream updates information in the plurality streamsbased on the organization of data within the data stream.

Turning to the drawings, wherein like reference numerals refer to likeelements, the invention is illustrated as being implemented in asuitable computing environment. Although not required, the inventionwill be described in the general context of computer-executableinstructions, such as program modules, being being executed by apersonal computer. Generally, program modules include routines,programs, objects, components, data structures, etc. that performparticular tasks or implement particular abstract data types. Theinvention may also be practiced in distributed computing environmentswhere tasks are performed by remote processing devices that are linkedthrough a communications network. In a distributed computingenvironment, program modules may be located in both local and remotememory storage devices.

FIG. 1 illustrates an example of a suitable computing system environment100 on which the invention may be implemented. The computing systemenvironment 100 is only one example of a suitable computing environmentand is not intended to suggest any limitation as to the scope of use orfunctionality of the invention. Neither should the computing environment100 be interpreted as having any dependency or requirement relating toany one or combination of components illustrated in the exemplaryoperating environment 100.

The invention is operational with numerous other general purpose orspecial purpose computing system environments or configurations.Examples of well known computing systems, environments, and/orconfigurations that may be suitable for use with the invention include,but are not limited to, personal computers, server computers, hand-heldor laptop devices, multiprocessor systems, microprocessor-based systems,set top boxes, programmable consumer electronics, network PCs,minicomputers, mainframe computers, distributed computing environmentsthat include any of the above systems or devices, and the like.

The invention may be described in the general context ofcomputer-executable instructions, such as program modules, beingexecuted by a computer. Generally, program modules include routines,programs, objects, components, data structures, etc. that performparticular tasks or implement particular abstract data types. Theinvention may also be practiced in distributed computing environmentswhere tasks are performed by remote processing devices that are linkedthrough a communications network. In a distributed computingenvironment, program modules may be located in both local and remotecomputer storage media including memory storage devices.

With reference to FIG. 1, an exemplary system for implementing theinvention includes a general purpose computing device in the form of acomputer 110. Components of computer 110 may include, but are notlimited to, a processing unit 120, a system memory 130, and a system bus121 that couples various system components including the system memoryto the processing unit 120. The system bus 121 may be any of severaltypes of bus structures including a memory bus or memory controller, aperipheral bus, and a local bus using any of a variety of busarchitectures. By way of example, and not limitation, such architecturesinclude Industry Standard Architecture (ISA) bus, Micro ChannelArchitecture (MCA) bus, Enhanced ISA (EISA) bus, Video ElectronicsStandards Associate (VESA) local Associate (VESA) local bus, andPeripheral Component Interconnect (PCI) bus also known as Mezzanine bus.

Computer 110 typically includes a variety of computer readable media.Computer readable media can be any available media that can be accessedby computer 110 and includes both volatile and nonvolatile media,removable and non-removable media. By way of example, and notlimitation, computer readable media may comprise computer storage mediaand communication media. Computer storage media includes both volatileand nonvolatile, removable and non-removable media implemented in anymethod or technology for storage of information such as computerreadable instructions, data structures, program modules or other data.Computer storage media includes, but is not limited to, RAM, ROM,EEPROM, flash memory or other memory technology, CD-ROM, digitalversatile disks (DVD) or other optical disk storage, magnetic cassettes,magnetic tape, magnetic disk storage or other magnetic storage devices,or any other medium which can be used to store the desired informationand which can be accessed by computer 110. Communication media typicallyembodies computer readable instructions, data structures, programmodules or other data in a modulated data signal such as a carrier waveor other transport mechanism and includes any information deliverymedia. The term “modulated data signal” means a signal that has one ormore of its characteristics set or changed in such a manner as to encodeinformation in the signal. By way of example, and not limitation,communication media includes wired communication media includes wiredmedia such as a wired network or direct-wired connection, and wirelessmedia such as acoustic, RF, infrared and other wireless media.Combinations of the any of the above should also be included within thescope of computer readable media.

The system memory 130 includes computer storage media in the form ofvolatile and/or nonvolatile memory such as read only memory (ROM) 131and random access memory (RAM) 132. A basic input/output system 133(BIOS), containing the basic routines that help to transfer informationbetween elements within computer 110, such as during start-up, istypically stored in ROM 131. RAM 132 typically contains data and/orprogram modules that are immediately accessible to and/or presentlybeing operated on by processing unit 120. By way of example, and notlimitation, FIG. 1 illustrates operating system 134, applicationprograms 135, other program modules 136, and program data 137.

The computer 110 may also include other removable/non-removable,volatile/nonvolatile computer storage media. By way of example only,FIG. 1 illustrates a hard disk drive 141 that reads from or writes tonon-removable, nonvolatile magnetic media, a magnetic disk drive 151that reads from or writes to a removable, nonvolatile magnetic disk 152,and an optical disk drive 155 that reads from or writes to a removable,nonvolatile optical disk 156 such as a CD ROM or other optical media.Other removable/non-removable, volatile/nonvolatile computer storagemedia that can be used in the exemplary operating environment include,but include, but are not limited to, magnetic tape cassettes, flashmemory cards, digital versatile disks, digital video tape, solid stateRAM, solid state ROM, and the like. The hard disk drive 141 is typicallyconnected to the system bus 121 through a non-removable memory interfacesuch as interface 140, and magnetic disk drive 151 and optical diskdrive 155 are typically connected to the system bus 121 by a removablememory interface, such as interface 150.

The drives and their associated computer storage media discussed aboveand illustrated in FIG. 1, provide storage of computer readableinstructions, data structures, program modules and other data for thecomputer 110. In FIG. 1, for example, hard disk drive 141 is illustratedas storing operating system 144, application programs 145, other programmodules 146, and program data 147. Note that these components can eitherbe the same as or different from operating system 134, applicationprograms 135, other program modules 136, and program data 137. Operatingsystem 144, application programs 145, other program modules 146, andprogram data 147 are given different numbers hereto illustrate that, ata minimum, they are different copies. A user may enter commands andinformation into the computer 110 through input devices such as akeyboard 162 and pointing device 161, commonly referred to as a mouse,trackball or touch pad. Other input devices (not shown) may include amicrophone, joystick, game pad, satellite dish, scanner, or the like.These and other input devices are often connected to the processing unit120 through a user input interface 160 that is coupled to the systembus, but may be coupled to the system bus, but may be connected by otherinterface and bus structures, such as a parallel port, game port or auniversal serial bus (USB). A monitor 191 or other type of displaydevice is also connected to the system bus 121 via an interface, such asa video interface 190. In addition to the monitor, computers may alsoinclude other peripheral output devices such as speakers 197 and printer196, which may be connected through a output peripheral interface 195.

The computer 110 may operate in a networked environment using logicalconnections to one or more remote computers, such as a remote computer180. The remote computer 180 may be another personal computer, a server,a router, a network PC, a peer device or other common network node, andtypically includes many or all of the elements described above relativeto the personal computer 110, although only a memory storage device 181has been illustrated in FIG. 1. The logical connections depicted in FIG.1 include a local area network (LAN) 171 and a wide area network (WAN)173, but may also include other networks. Such networking environmentsare commonplace in offices, enterprise-wide computer networks, intranetsand the Internet.

When used in a LAN networking environment, the personal computer 110 isconnected to the LAN 171 through a network interface or adapter 170.When used in a WAN networking environment, the computer 110 typicallyincludes a modem 172 or other means for establishing communications overthe WAN 173, WAN 173, such as the Internet. The modem 172, which may beinternal or external, may be connected to the system bus 121 via theuser input interface 160, or other appropriate mechanism. In a networkedenvironment, program modules depicted relative to the personal computer110, or portions thereof, may be stored in the remote memory storagedevice. By way of example, and not limitation, FIG. 1 illustrates remoteapplication programs 185 as residing on memory device 181. It will beappreciated that the network connections shown are exemplary and othermeans of establishing a communications link between the computers may beused.

In the description that follows, the invention will be described withreference to acts and symbolic representations of operations that areperformed by one or more computer, unless indicated otherwise. As such,it will be understood that such acts and operations, which are at timesreferred to as being computer-executed, include the manipulation by theprocessing unit of the computer of electrical signals representing datain a structured form. This manipulation transforms the data or maintainsit at locations in the memory system of the computer, which reconfiguresor otherwise alters the operation of the computer in a manner wellunderstood by those skilled in the art. The data structures where datais maintained are physical locations of the memory that have particularproperties defined by the format of the data. However, while theinvention is being described in the foregoing context, it is not meantto be limiting as those of skill in the art will the art will appreciatethat various of the acts and operation described hereinafter may also beimplemented in hardware.

FIG. 2 illustrates an exemplary operating arrangement and image fileformat used to implement the present invention. The operatingarrangement includes a computer 200 interfaced to source storage media204 and destination storage media 206. An operating system 202 executeswithin the computer 200. The operating system 202 includes componentssuch as file system driver 208, image driver 210 and device driver 212that facilitate communication between the computer 200 and the storagemedia 204 and 206.

Each storage media is logically divided into one or more volumes.Storage media 204 is divided into a first volume 214 and a second volume216. Storage media 206 is divided into a single volume. The storagemedia 204 and 206 are defined according to a geometry. The geometry ofthe storage media includes a number of cylinders, tracks per cylinderand sectors per track. A sector is a physical unit on the storage media.Each sector is capable of storing a certain amount of information, forexample, 512 bytes. The geometry of storage media is known and need notbe described in detail herein.

A cluster is a group of one or more sectors. The operating system 202reads information from and writes data to storage media by referencingone or more clusters on the storage media. A file system determines thenumber of sectors that comprise a cluster. Various known file systemsexist such as File Allocation Table Table 16 (FAT16), File AllocationTable 32 (FAT32), Compact Disk File System (CDFS), and New TechnologyFile System (NTFS).

As shown, the first volume 214 of the source storage media 204 includessource data 218. The source data 218 includes a plurality of files suchas operating system files 236, executable programs 238 such asapplication programs, and data files 240 used with the applicationprograms. The source data 218 also includes control information 242. Thecontrol information includes file allocation data 249 that identifiesthe clusters on the storage media volume 214 that include data for eachfile. The control information 242 also includes a bitmask 248. Thebitmask 248 comprises a plurality of bits and each bit corresponds toone cluster on the storage media volume. The value of each bit in thebitmask identifies whether the corresponding cluster includes storeddata for at least one file or whether the cluster remains unallocated.

The manner used to organize and store the control information 242 andfiles 236, 238, 240 depends on the file system used. By way of example,the NTFS file system stores a Master File Table (MFT) on the storagemedia. The MFT includes an extent list for each file stored on thestorage media. The extent list includes a series of entries thatidentify a starting block and length. The starting block and lengthdefine a series of contiguous clusters that include data for the file.

Other information included as part of the source data 218 includes pagedmemory 244 and a BIOS Parameter Block (BPB). The paged memory 244 is aportion of the computer's memory that is written to the storage media214. The BPB 246 includes data about the storage media volume such asthe size of media and the location of certain files on the storagemedia.

The destination storage media 206 includes an image file 220. The imagefile is a logical capture of information, such as source data 218. Inthe present invention, the 30 image file 220 is used to restore thesource data 218 to the source storage media volume 214. Alternatively,the image file 220 is used to provide one or more storage media volumeswith the same configuration as the source storage media volume 214.

The image file 220 includes a plurality of image streams. As shown, theimage file 220 includes a control stream 222, a data stream 224, abitmap stream 226, a cluster map stream 228, an audit trail stream 230,and a property stream 232. The image streams are stored on thedestination storage media 206 as part of the image file 220. The imagefile 220 also includes a fix-up stream 234. The fix-up stream 234 isused to modify data in the other image streams before they are writtento the image file 220. In an embodiment of the invention, the audittrail stream 230 and properties stream 232 are optional.

In the embodiment shown, the destination storage media 206 and thesource storage media 214 interface to the computer 200 via a commondevice driver 212 and file system driver 208 thereby assuming that bothstorage media employ a common file system and a common storage mediatype. As those skilled in the art in the art will recognize, differentstorage media may utilize different file systems and different storagemedia types. For example, storage media 206 may be a CD ROM using theCDFS file system while storage media 204 may be a hard disk using FAT16or FAT32. In that case, a plurality of file system drivers 208 anddevice drivers 212 may be required.

Typically, a user requests that the image file 220 be created via systemtools 232. The systems tools are implemented in any suitable manner suchas a user interface or command line request. Alternatively, system tools232 are implemented as part of another program module such as anapplication program. The request is passed to the image driver 210 whichobtains access to the source media 204 and destination media 206 viafile system driver 208. Once the image driver 210 obtains access to thesource and destination storage media, the operating system 202interfaces to the storage media through the image driver 210 and thedevice driver 212. To create the image file, the operating system readsthe source data 218, creates the plurality of image streams 222-234 andwrites the image streams to the destination storage media 206. Torestore the source data 218 from an image file 220, a user request torestore the source data 218 is initiated from system tools 232. Theimage driver 210 obtains access to the source storage media volume 214and the image file 220 via file system driver 208. The operating systemreads the image file 220 via the image driver 210 and device driver 212.The operating system 202 then restores the source data 218 to the sourcestorage media 214 based on the data media 214 based on the data in theimage file 220.

FIG. 3 shows an embodiment of the image file 220 used to implement thepresent invention. The image file 220 includes the control stream 222,the data stream 224, the bitmap stream 226, the cluster map stream 228,the audit trail stream 230, and the property stream 232. As previouslydescribed, the audit trail stream 230 and the property streams 232 areoptional and implemented to provide additional functionality to theimage file 220. The fix-up stream 234 is a temporary stream used tomodify data in the other image streams before the other streams arewritten to the image file 220.

The control stream 222 is a data structure that functions as a headerdescribing attributes of the image file 220 needed to open and interpretother data included in the image file 220. Data in the control streamincludes an image identification 250, volume information 252, storagemedia geometry 254, file system information 256, operating systeminformation 258, and compression information 260.

The image identification 250 is data that uniquely identifies the imageand also data that identifies a size in bytes of the control stream 222.The volume information 252 includes data that defines the source storagemedia volume 214. Data in the volume information 252 includes a volumeoffset from the beginning of beginning of the storage media 204, alength of the volume, number of hidden sectors on the volume, a volumenumber, and the type of file system used by the volume.

The storage media geometry 254 includes data that describes physicalattributes of the source storage media 254 including the number ofcylinders, the number of tracks per cylinder, and the number of sectorsper track. The file system information 256 includes data that identifiesthe total number of clusters, bytes per cluster and number of clustersper record.

The operating system information 258 includes data that identifies anoperating system version that is stored on the source storage mediavolume 214. The operating system information 258 also includes data thatidentifies any updates made to the operating system such as service packidentification. A service pack is an update to a software program thatfixes known problems with the software program or that providesenhancements to the software program. The service pack identificationidentifies any service packs stored on the source storage media volume214 for the operating system files 236. The compression/encryptioninformation 260 includes data that identifies whether the image file 220is compressed and whether the image file 220 is encrypted.

The data stream 224 includes the data for each of the files located onthe target storage media volume 214. The data for each file isoptionally compressed or encrypted using known methods. As described inmore detail below, the decision the decision to compress data is made ona file by file basis. Thus, some data in the data stream 224 may becompressed while other data is not. Similarly, some data in the datastream 224 may be encrypted while other data is not. The controlinformation 242 that forms part of the source data 218 also comprisesone or more files and is stored as part of the data stream 224.

In an embodiment of the invention, the data stream 224 does not includemultiple copies of identical data. For example, if multiple copies ofthe same data file 240 are stored in the source storage media volume214, only one copy of the data file 240 is stored in the data stream224. Paged memory 244 also need not be included in the data stream 224.When the image file 220 is restored on a storage media volume, theoperating system 220 creates paged memory 244 on the storage mediavolume as needed. Eliminating multiple copies of data and paged memoryfiles reduces the size of image file 220.

The cluster map stream 228 correlates a location of data within theimage file 220 to its location on the source storage media volume 214.The cluster map stream 228 comprises a series of records. FIG. 3 shows asingle record within the cluster map stream 228. Each record includes astarting cluster 262 and an ending cluster 264. The starting cluster 262and ending cluster 264 identify the starting and ending cluster wherethe data is located on the source storage media 214. The offset 268identifies a starting location of the data in the data stream 224, asmeasured from the beginning of the data stream. For compressed files,data length in the image file 220 is equal to the compressed size 270.For uncompressed data, the data length in the image file 220 is theproduct of the length 266 and the number of bytes per cluster, asidentified in the control stream 222. The flag field 272 identifieswhether the data in the image file 220 is compressed or uncompressed.

The cluster map stream 228 provides a mechanism that allows theoperating system to locate data in the data stream 224. This allows theimage file to be viewed and edited.

Referring to FIG. 4, an example of the relationship between the locationof data within the data stream 224 to its location on the source storagemedia volume 214 is illustrated in FIG. 4, it is assumed that the bytesper cluster is 512 as identified in the control stream 222. The sourcestorage media volume 214 includes sequentially numbered blocks. Eachbock represents one cluster on the source storage media volume. The datastream 224 also includes sequentially labeled blocks. Each block in thedata stream 224 represents a be in the data stream 224 and the numberrepresents the offset, in bytes, from the beginning of the data stream224.

The starting cluster field 262 of the cluster map record 228 includes astarting cluster 100 and the ending cluster field 149 includes endingcluster 149. Thus, the data is stored on clusters 100 through 149 of thesource storage media volume 214 as generally shown. The offset field hasa value of 1000. Accordingly, the data starts at an offset of 1000 bytesfrom the beginning of the data stream 224. Field 272 indicates that thedata is not compressed. Thus, the length of the data in the data stream224 is the product of length, which is identified as 50 in the lengthfield 266, and the number of bytes per cluster 512 (50 clusters*512bytes per cluster=25,600 bytes). As shown, the corresponding data in theimage file is located at bytes 1000 through 26599 as referenced from thebeginning of the data stream 224.

If multiple copies of the same data is stored on the source storagemedia volume 214, the data is only placed in the data stream 224 onetime. Where this occurs, multiple records in the cluster stream 228 arecreated, one record for each occurrence of the data on the sourcestorage media volume 214. Each record includes the same length 266,offset 262, compressed size 270, and compression 272 fields and therebypoint to the same data in the data stream 224. The starting cluster 262and ending cluster 264 fields are different thereby identifying multiplelocations on the source storage media 214 where the data belongs.

Returning to FIG. 3, the bitmap stream 226 is used to identify allocatedand unallocated clusters of the target storage media volume 214. Theallocated clusters are clusters that include data for a file on thetarget storage media volume 214. Unallocated clusters are clusters thatare available to store new data. In the example shown, the bitmap streamis implemented as a bitmap. Each bit in the bitmap corresponds to acluster on the target storage media 214. A bit with a value value of “1”represents an allocated cluster while a bit with a value of “0”represents an unallocated cluster. The bitmap stream performs the samefunction as the bitmask 240. However, because the bitmap stream 226 isoutside the data stream 224, it is readily accessible within the imagefile 220.

The audit trail stream 230 includes data that identifies any changesmade to the image file, the user that initiated the change, the files,if any that were modified, and the date and time that the changes wereimplemented. The property stream 232 includes data that identifiesattributes of the image file 220 such as operating system version. Theproperty stream 232 is queried to identify image files 220 with desiredattributes. For example, the property stream 232 is queried to locateimages files that include a particular version of the operating system.The audit trail stream 230 and property stream 232 are implemented inany suitable manner.

The fix-up stream is used to modify the image streams after the sourcedata 218 is read by the operating system 202. For example, when thesource data 218 is placed in the data stream 224 it may be movedrelative to its original location on the source storage media 214. Thefix-up stream updates the BPB 246 and control information 242 within thedata stream to reflect the proper location of the source data 218.

FIGS. 5 a and 5 b illustrate how data on the source storage media 214 isoptionally defragmented when placed into the data stream 224. As shown,the source data 218 is stored on the source storage media 214. Data forFile A is stored on clusters labeled 280, data for File B is stored onclusters labeled 282, and data for File C is stored on clusters labeled284. As shown, the data for File A and the data for File B are stored onnon-contiguous clusters. When the data for a file is stored onnon-contiguous clusters, the file is said to be fragmented.

When the operating system 202 reads the control information 242 on thesource storage media 214 for File A, it identifies the clusterscontaining data for the file, labeled 280, and reads the data. Theoperating system then places the data for File A in contiguouslocations, labeled 287, within the data stream 224. The operating system202 follows the same process for File B and File C. As shown in FIG. 5b,the data for File B and File C are placed in contiguous locations,labeled 288 and 289 respectively. Because the data is placed incontiguous locations, the operating system 202 can defragment the fileby updating the file allocation 249 for each file. The method used todefragment the files on the source storage media 214 is described morefully below.

As previously described, the control information 242 including thevolume bitmask 248 and the file allocation 249 for each file is storedin the data stream 224 as one or more files. The data 286 for thecontrol information 242 is typically located at the end of the datastream 224 as shown in FIG. 5 b.

When the files are defragmented, the cluster map 228 records aremodified to 15 reflect the new data locations. Because the data is movedfrom its original location, the starting and ending cluster may notcorrespond to the original location of the source data on the sourcestorage media volume. Instead, the starting and ending cluster identifythe location where the data will be stored when the image file isrestored to a storage media volume.

FIGS. 6 and 7 illustrate processes used to create the image file 220from the source storage media volume 214. By way of example, the process290 is executed by an operating system component such as by a programmodule operating within image driver 210. Alternatively, the process 290is executed in whole or in part by system tools 232. Typically, theimage file 220 is created via a user request from system tools 232.

After the request is received from system tools 232, the operatingsystem 202 opens the source storage media volume 214 as shown in step292. To open the source storage media volume 214, the image driver 210obtains a reference to the source storage media volume 214 via filesystem driver 208. Once the reference to the storage media volume 214 isobtained, the operating system 202 communicates with the storage media214 via image driver 210 and device driver 212.

In step 294, the process 290 creates the plurality of image streams ofthe image file 220 including the control stream 222, the data stream224, the bitmap stream 226, the cluster map stream 228, the audit trailstream 230, the properties stream 232 and the fix-up stream 234. At thispoint, the plurality of streams streams comprising the image file 220are implemented as in memory structures or, alternatively, areimplemented directly on the destination storage media volume 206.

In step 296, the process 290 reads the control information 242 on thesource storage media volume 214. The control information 242 identifiesthe plurality of files on the source storage media volume 214 and theclusters allocated to each of the files. For example, if the sourcestorage media volume uses the NTFS file system, the process 290 readsthe MFT on the storage media volume 214.

In step 298, the process 290 reads the data for a first file identifiedby the control information 242. In step 300, the process places the datafor the file in the data stream 224. As previously described, ifmultiple copies of the file data exist, the data is only placed in thedata stream one time. Additionally, if the file data is part of pagedmemory 244, it need not be placed in the data stream 224. The data forthe file is optionally defragmented when placed into the data stream224.

In step 302, the cluster stream 228 is updated by adding a record thatcorrelates the location of the data on the source storage media volume214 to its location in the data stream 224. The cluster map stream 228allows the operating system 202 to access and edit data within the datastream 224. In step 304 the process 290 determines whether the sourcestorage media volume 214 includes more file data. If more file dataexists, the process 290 returns to step 298 and reads reads the data forthe next file.

If no more file data exists, the process 290 proceeds to step 306 andapplies fix ups to the image file streams. The fix-ups are applied toaccount for data movement. For example, as previously described, theprocess 290 may defragment the data for the plurality of files on thesource storage media 214. Thus, the process 290 modifies the controlinformation 242 located in the data stream 224 so that controlinformation 242 identifies the clusters now allocated to each file. Inthe case of an NTFS volume, the process corrects the extent list foreach file in the MFT. Because the data for each file is defragmented,the extent list for each file includes a single extent. The bitmask 248is also modified to properly reflect allocated and unallocated clusterson the target storage media in view of changes to data location. Fix-upsare also applied to the BPB 246. Because the location of filesreferenced in the BPB is changed, the BPB is modified so that the properlocation of files is referenced.

Once the process is complete, the control stream 222, data stream 224,bitmap stream 226, cluster map stream 228, audit trail stream 230, andproperties stream 232 are written to the destination storage media 206thereby forming image file 220 as shown in step 308.

FIG. 7 illustrates a process used to encrypt and compress data from thesource storage media volume 214. In step 320, the process 290 reads thedata stored on the clusters identified by the control information 242.In step 322, the process process 290 decides whether the compress thedata. In the invention, file compression is optional and may be userselectable via system tools 232 or any suitable operator interface. Iffile compression is selected, the process 290 compresses the data asshown in step 324. Preferably, the data is only compressed if it is notalready stored in a compressed format. The data is compressed, as shownin step 324, using any suitable compression/decompression (CODEC)algorithm.

In step 326, the process 290 determines whether to encrypt the data. Inthe invention, file encryption is optional and may be user selectablevia system tools 232. If selected, the data is encrypted using anysuitable known method as shown in step 328. Once the data is encryptedand/or compressed, if applicable, the data is written to the data stream224 as shown in step 330.

FIG. 8 shows a process, labeled 340, used to restore the image file 220to the source storage media volume 214. The process 340 may be executedby the operating system 202. Alternatively, the process 340 may beexecuted in whole or in part by system tools 232. In step 342, process340 opens the image file 220. The operating system 202 obtains areference to the destination storage media volume 206 via file systemdriver 208.

In step 344, the process 340 reads one of the plurality of the clustermap records 30 included in the cluster map stream 228. The cluster maprecord identifies the location in the data stream 224 for data and alsoidentifies the intended intended location of the data on the sourcestorage media volume 214. After reading the cluster map record, the datais read from the data stream 224 as shown in step 346. The data is thenwritten to the source storage media 214 on the clusters as identified bythe starting and ending clusters in the cluster map record 228.

In step 350, the process 340 determines if more records exist in thecluster map stream 228. If more records exist, the process returns tostep 344 where the next cluster map record is examined. If no morerecords exist, the process 340 proceeds to step 352 where fix-ups areapplied. The fix-ups are required if the geometry between the sourcestorage media volume 214 used to create the image file and the storagemedia volume where the source data 218 is restored are different. Forexample, if the location of files identified in the BPB is changed, theBPB is updated to reflect the new location of the files. Also, the BPBincludes geometry information of the storage media. The geometryinformation in the BPB needs to be updated to reflect the actualgeometry of the storage media that includes the restored source data218.

FIG. 9 shows a process used to decrypt and decompress data from theimage file 220. In step 360, the process 340 determines whether todecompress data. If the data requires decompression, the data isdecompressed using known decompression algorithms as shown in step 362.In step 364, the process 340 determines whether to decrypt the data. Ifthe data requires decryption, known decryption algorithms are used todecrypt the data as shown in step 366. Once the data is decompressed anddecrypted, as needed, the data is written to the source storage volume214. The data is written to the clusters as identified in the clusterrecord for the corresponding data.

All of the references cited herein, including are hereby incorporated intheir entireties by reference. In view of the many possible embodimentsto which the principles of this invention may be applied, it should berecognized that the embodiment described herein with respect to thedrawing figures is meant to be illustrative only and should not be takenas limiting the scope of invention. For example, those of skill in theart will recognize that the elements of the illustrated embodiment shownin software may be implemented in hardware and vice versa or that theillustrated embodiment can be modified in arrangement and detail withoutdeparting from the spirit of the invention. Therefore, the invention asdescribed herein contemplates all such embodiments as may come withinthe scope of the following claims and equivalents thereof.

1. A destination storage media having an image file stored thereon,wherein the image file is created from source data stored on a sourcestorage media, the image file including a plurality of image streams,comprising: a control stream including data identifying the image file;a data stream containing the source data; and a cluster map streamcontaining a plurality of records, each record identifying: a firstlocation corresponding to allocation of a portion of the source data onthe source media; a second location corresponding to a location of theportion of the source data in the data stream.
 2. The destinationstorage media of claim 1 wherein the source data includes a plurality offiles, wherein the plurality of image streams further comprising: aproperty stream that identifies at least one of the plurality of filesof the source data by a unique file identifier and a version.
 3. Thedestination storage media of claim 1 wherein the source data includes aplurality of files, wherein the plurality of image streams furthercomprising: an audit trail stream that identifies files modifiedsubsequent to the image file being created by a file identifier.
 4. Thedestination storage media volume of claim 1, wherein at least a portionof the source data is encrypted.
 5. The destination storage media volumeof claim 1, wherein at least a portion of the source data is compressed.6. The destination storage media volume of claim 1, wherein the controlstream identifies geometry of the source storage media.
 7. Thedestination storage media volume of claim 1, wherein the source dataincludes a plurality of files, each file comprising a set of data andwherein the set of data for each file is stored in contiguous locationswithin the data stream.
 8. The destination storage media of claim 1,wherein the plurality of image streams further comprising: a bitmaskstream containing data identifying allocated and unallocated clusters ofthe source storage media.
 9. A method for creating an image file on adestination storage media volume from source data on a source storagemedia volume; the source data including a plurality of files and controlinformation that identifies a location on the source storage mediacontaining data for each of the plurality of files, comprising: creatinga plurality of image streams including a data stream, and a cluster mapstream; reading the control information and identifying the location ofthe data for at least one file on the source storage media volume;reading the data for the at least one file; writing the data for the atleast one file into the data stream; creating a cluster map recordidentifying the location of the data on the source storage media volumeand a location of the data in the data stream; adding the cluster maprecord to the cluster map stream; and writing the plurality of imagestreams to the destination storage media.
 10. The method of claim 9wherein the plurality of streams further comprises a fix-up stream,further comprising: modifying the control information and the clustermap record to identify a new location of the data on the source storagemedia volume.
 11. The method of claim 9, further comprising: encryptingthe data for the at least one file.
 12. The method of claim 9, furthercomprising: compressing the data for the at least one file.
 13. Themethod of claim 9, wherein the step of writing the data for the at leastone file into the data stream comprises writing the data to contiguouslocations within the data stream and wherein the cluster map recordidentifies contiguous locations of the data on the source storage mediavolume.
 14. method for restoring data to a first storage media from animage file on a second storage media, wherein the image file comprises acluster map stream and a data stream, the cluster map including aplurality of records and the data stream including the data to berestored to the first storage media volume comprising: reading, from theimage file, one of the plurality of records, the record identifying: afirst location corresponding to a location of a set of data in the datastream; a second location, the second location corresponding to alocation for the set of data on the first storage media; reading thedata from the data stream from the first location; and writing the datato the first storage media at the second location.
 15. The method ofclaim 14 wherein the set of data in the data stream is compressed,further comprising: decompressing the set of data before writing thedata to the first storage media.
 16. The method of claim 14 wherein theset of data in the data stream is encrypted, further comprising:decrypting the set of data before writing the data to the first storagemedia.
 17. The method of claim 14 wherein the step of writing the datato the first storage media further comprises writing the data to a setof contiguous clusters.
 18. The method of claim 14 wherein the restoreddata includes control information that identifies storage media geometryand a location of files, further comprising modifying the controlinformation based on geometry of the first storage media.
 19. Acomputer-readable medium having computer executable instruction forcreating an image file on a destination storage media volume from sourcedata on a source storage media volume; the source data including aplurality of files and control information that identifies a location onthe source storage media containing data for each of the plurality offiles, comprising: creating a plurality of image streams including adata stream, and a cluster map stream; reading the control informationand identifying the location of the data for at least one file on thesource storage media volume; reading the data for the at least one file;writing the data for the at least one file into the data stream;creating a cluster map record identifying the location of the data onthe source storage media volume and a location of the data in the datastream; adding the cluster map record to the cluster map stream; andwriting the plurality of image streams to the destination storage media.20. The computer-readable medium of claim 19, further comprising:encrypting the data for the at least one file.
 21. The computer-readablemedium of claim 19, further comprising: compressing the data for the atleast one file.
 22. The computer-readable medium of claim 19, whereinthe step of writing the data for the at least one file into the datastream comprises writing the data to contiguous locations within thedata stream and wherein the cluster map record identifies contiguouslocations of the data on the source storage media volume.
 23. Acomputer-readable medium having computer executable instructions forrestoring data to a first storage media from an image file on a secondstorage media, wherein the image file comprises a cluster map stream anda data stream, the cluster map including a plurality of records and thedata stream including the data to be restored to the first storage mediavolume comprising: reading, from the image file, one of the plurality ofrecords, the record identifying a first location, the first locationcorresponding to a location of a set of data in the data stream andidentifying a second location, the second location corresponding to alocation for the set of data on the first storage media; reading thedata from the data stream from the first location; and writing the datato the first storage media at the second location.
 24. Thecomputer-readable medium of claim 23 wherein the set of data in the datastream is compressed, further comprising: decompressing the set of databefore writing the data to the first storage media.
 25. Thecomputer-readable medium of claim 23 wherein the set of data in the datastream is encrypted, further comprising: decrypting the set of databefore writing the data to the first storage media.